package com.beamfield.dao.material;

import com.beamfield.model.Demand;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Controller;

import java.util.List;

@Controller
public interface DemandMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Demand record);

    int insertSelective(Demand record);

    Demand selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(Demand record);

    int updateByPrimaryKey(Demand record);

    List<Demand> selectByProjectId(@Param("projectId") String projectId,
                                   @Param("demandName") String demandName,
                                   @Param("offset") String offset,
                                   @Param("limit") String limit,
                                   @Param("appr") String appr,
                                   @Param("beamId") Long beamId);

    long countByProjectId(@Param("projectId") String projectId, @Param("demandName") String demandName, @Param("appr") String appr,@Param("beamId") Long beamId);

    long countAllDemand(long beamid);
    long countPassDemand(long beamid);
    long countCheckDemand(long beamid);
}